[incubator-kie-issues-2204] Quarkus upgrade 3.27 and Spring Boot to 3.5.10#4178
[incubator-kie-issues-2204] Quarkus upgrade 3.27 and Spring Boot to 3.5.10#4178yesamer merged 5 commits intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Upgrades core platform dependencies (Quarkus/Spring Boot) and aligns related libraries (AsyncAPI, Fabric8, Kafka, etc.), including required code/spec/test updates to accommodate upstream API changes.
Changes:
- Updated BOM-managed dependency versions (Quarkus/Spring Cloud/Fabric8/Kafka/Jackson/etc.).
- Migrated AsyncAPI specs and the Quarkus AsyncAPI converter to AsyncAPI v3 structure (operations separated from channels).
- Updated Fabric8 mock-server test infrastructure and Quarkus tests to newer Fabric8/Quarkus testing APIs; adjusted Kafka MockProducer construction for the newer Kafka client.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| springboot/bom/pom.xml | Updates Spring Cloud BOM version to align with the upgraded Spring Boot stack. |
| quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/main/resources/specs/callbackResults.yaml | Migrates AsyncAPI spec to v3 (channels/messages/operations reshaped). |
| quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/main/resources/specs/asyncAPI.yaml | Migrates AsyncAPI spec to v3 (channels/messages/operations reshaped). |
| quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/src/main/resources/specs/asyncAPI.yaml | Migrates AsyncAPI spec to v3 for live-reload tests. |
| quarkus/bom/pom.xml | Updates Fabric8 Kubernetes client version managed by the Quarkus BOM. |
| quarkus/addons/rest-exception-handler/pom.xml | Updates test dependency version for jakarta.xml.bind-api. |
| quarkus/addons/process-management/runtime/pom.xml | Updates test dependency version for jakarta.xml.bind-api. |
| quarkus/addons/process-instance-migration/runtime/pom.xml | Updates test dependency version and removes deprecated compiler arg. |
| quarkus/addons/opentelemetry/runtime/src/main/java/org/kie/kogito/quarkus/serverless/workflow/opentelemetry/config/SonataFlowOtelConfig.java | Adds/expands configuration JavaDoc for OpenTelemetry config mapping. |
| quarkus/addons/opentelemetry/runtime/pom.xml | Removes deprecated compiler arg in annotation processor config. |
| quarkus/addons/opentelemetry/deployment/pom.xml | Removes deprecated compiler arg in annotation processor config. |
| quarkus/addons/kubernetes/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/OpenShiftMockServerTestResource.java | Migrates OpenShift mock server test resource to Fabric8 7.x APIs. |
| quarkus/addons/kubernetes/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KubernetesMockServerTestResource.java | Migrates Kubernetes mock server test resource to Fabric8 7.x APIs and exposes client. |
| quarkus/addons/kubernetes/integration-tests/src/test/java/org/kie/kogito/addons/quarkus/kubernetes/ConfigValueExpanderIT.java | Updates integration test to use @QuarkusTestResource and injected KubernetesClient. |
| quarkus/addons/knative/serving/integration-tests/src/test/java/org/kie/kogito/addons/quarkus/knative/serving/customfunctions/it/KnativeServingAddonIT.java | Updates test to use @QuarkusTestResource and injected KubernetesClient. |
| quarkus/addons/jwt-parser/runtime/pom.xml | Removes deprecated compiler arg in annotation processor config. |
| quarkus/addons/jwt-parser/deployment/pom.xml | Removes deprecated compiler arg in annotation processor config. |
| quarkus/addons/grpc/deployment/pom.xml | Adds an explicit Quarkus devtools dependency required by the newer Quarkus toolchain. |
| quarkus/addons/events/rules/deployment/pom.xml | Adjusts deployment dependencies (removes an unneeded/duplicate Quarkus deployment dependency). |
| quarkus/addons/asyncapi/deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java | Migrates converter logic to AsyncAPI v3 model (operations/channel ref resolution). |
| kogito-serverless-workflow/kogito-serverless-workflow-executor-tests/src/test/java/org/kie/kogito/serverless/workflow/executor/MockKafkaEventEmitterFactory.java | Updates MockProducer construction for newer Kafka client API expectations. |
| kogito-serverless-workflow/kogito-serverless-workflow-executor-kafka/src/test/java/org/kie/kogito/serverless/workflow/executor/MockKafkaEventEmitterFactory.java | Updates MockProducer construction for newer Kafka client API expectations. |
| kogito-build/kogito-dependencies-bom/pom.xml | Updates core dependency versions (Quarkus/Spring/Kafka/Jackson/etc.) and aligns select transitive overrides (e.g., lz4 relocation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/test/java/org/kie/kogito/serverless/workflow/executor/MockKafkaEventEmitterFactory.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
...n/kogito-quarkus-serverless-workflow-integration-test/src/main/resources/specs/asyncAPI.yaml
Outdated
Show resolved
Hide resolved
...o-quarkus-serverless-workflow-integration-test/src/main/resources/specs/callbackResults.yaml
Outdated
Show resolved
Hide resolved
...uarkus-serverless-workflow-extension-live-reload-test/src/main/resources/specs/asyncAPI.yaml
Outdated
Show resolved
Hide resolved
.../src/test/java/org/kie/kogito/serverless/workflow/executor/MockKafkaEventEmitterFactory.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Thanks @jeejz , great stuff!
Could you please verify why all the downstream build failed ? Pls check that those have used your "quarkus upgrade" branches.
Could you also pls include, in the description, all the PRs that are part of this quarkus upgrade task: thx!
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Show resolved
Hide resolved
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
|
sorry, marked it ready for review by mistake |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 47 out of 47 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * The TrustyService image to use. | ||
| */ | ||
| @ConfigItem | ||
| public String imageName; | ||
| Optional<String> imageName(); | ||
|
|
There was a problem hiding this comment.
imageName() is defined as Optional<String> with no default. Since DevServices container startup requires an image name, consider providing a default via @WithDefault (and returning String) or ensure callers handle the empty case explicitly (rather than propagating null and failing later).
| public TrustyServiceDevServiceConfig(final KogitoDevServicesBuildTimeConfig config) { | ||
| this.devServicesEnabled = config.enabled.orElse(true); | ||
| this.imageName = config.imageName; | ||
| this.fixedExposedPort = config.port.orElse(0); | ||
| this.shared = config.shared; | ||
| this.serviceName = config.serviceName; | ||
| this.portUsedByTest = config.portUsedByTest; | ||
| this.devServicesEnabled = config.enabled().orElse(true); | ||
| this.imageName = config.imageName().orElse(null); | ||
| this.fixedExposedPort = config.port().orElse(0); | ||
| this.shared = config.shared(); | ||
| this.serviceName = config.serviceName(); | ||
| this.portUsedByTest = config.portUsedByTest(); |
There was a problem hiding this comment.
imageName is now populated via config.imageName().orElse(null). If the property isn’t set, this will later cause a NullPointerException when DockerImageName.parse(config.imageName) is called during container startup. Consider making imageName required (non-Optional) or providing a safe default / explicit error when absent instead of storing null here.
| private static final String TEST_NAMESPACE = "serverless-workflow-greeting-quarkus"; | ||
| private final KubernetesServer server = new KubernetesServer(false, true); // Use CRUD mode | ||
| private static KubernetesMockServer server; | ||
| private KubernetesClient client; | ||
|
|
||
| @Override | ||
| public Map<String, String> start() { | ||
| try { | ||
| server.before(); // Start the mock Kubernetes server | ||
| } catch (Exception e) { | ||
| throw new RuntimeException("Failed to start Kubernetes mock server", e); | ||
| } | ||
| // Fabric8 7.3.1: Create mock server with CRUD mode via KubernetesCrudDispatcher. | ||
| // Context is fully qualified to avoid clash with QuarkusTestResourceLifecycleManager.Context. | ||
| // useHttps=false to avoid SSL handshake overhead in tests. | ||
| server = new KubernetesMockServer( | ||
| new io.fabric8.mockwebserver.Context(), | ||
| new MockWebServer(), | ||
| new HashMap<>(), | ||
| new KubernetesCrudDispatcher(), | ||
| false); | ||
| server.init(); | ||
|
|
||
| String mockServerUrl = server.getClient().getConfiguration().getMasterUrl(); | ||
| // Fabric8 7.x: createClient() replaces getClient() from Fabric8 6.x | ||
| client = server.createClient(); | ||
| String mockServerUrl = client.getConfiguration().getMasterUrl(); | ||
|
|
||
| // Ensure the Fabric8 client picks up the mock server | ||
| System.setProperty(Config.KUBERNETES_MASTER_SYSTEM_PROPERTY, mockServerUrl); | ||
|
|
||
| Map<String, String> config = new HashMap<>(); | ||
| config.put("quarkus.kubernetes-client.master-url", mockServerUrl); | ||
| config.put("quarkus.kubernetes-client.namespace", TEST_NAMESPACE); | ||
| config.put("quarkus.kubernetes-client.trust-certs", "true"); | ||
| return config; | ||
| } | ||
|
|
||
| @Override | ||
| public void stop() { | ||
| if (client != null) { | ||
| client.close(); | ||
| } | ||
| if (server != null) { | ||
| server.after(); // Stop the mock server | ||
| server.destroy(); | ||
| server = null; | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Expose the Fabric8 Kubernetes mock server instance for advanced use in tests. | ||
| */ | ||
| public KubernetesServer getServer() { | ||
| public static KubernetesMockServer getServer() { | ||
| return server; | ||
| } |
There was a problem hiding this comment.
server is now a static field but there are no usages of the static getServer() in the codebase. Keeping the mock server static increases the risk of state leaking between test classes (and makes parallel test execution unsafe). Prefer making server an instance field and getServer() non-static (or remove the accessor entirely if not needed).
...main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KubernetesMockServerTestResource.java
Outdated
Show resolved
Hide resolved
...rg/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
Outdated
Show resolved
Hide resolved
...rg/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
Show resolved
Hide resolved
...rg/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
Outdated
Show resolved
Hide resolved
| try { | ||
| Path tempDir = Files.createTempDirectory("kafka-streams-test"); | ||
| properties.put(StreamsConfig.STATE_DIR_CONFIG, tempDir.toString()); | ||
| } catch (IOException e) { | ||
| throw new RuntimeException("Failed to create temp directory for Kafka Streams state", e); | ||
| } |
There was a problem hiding this comment.
Files.createTempDirectory(...) creates a new state dir for Kafka Streams but it’s never cleaned up, which can leave many temp folders behind on developer machines / CI workers. Consider registering it for deletion (e.g., deleteOnExit() and/or deleting recursively in @AfterEach), or use JUnit’s @TempDir so lifecycle cleanup is automatic.
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java
Outdated
Show resolved
Hide resolved
.../test/java/org/kie/kogito/addons/quarkus/k8s/config/KubeDiscoveryConfigCacheUpdaterTest.java
Outdated
Show resolved
Hide resolved
...main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KubernetesMockServerTestResource.java
Outdated
Show resolved
Hide resolved
...s/flyway/runtime/src/main/java/org/kie/flyway/quarkus/KieQuarkusFlywayNamedModuleConfig.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/kie/kogito/addons/quarkus/knative/eventing/deployment/SinkConfiguration.java
Outdated
Show resolved
Hide resolved
...ava/org/kie/kogito/tracing/decision/quarkus/deployment/KogitoDevServicesBuildTimeConfig.java
Outdated
Show resolved
Hide resolved
...rg/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
Outdated
Show resolved
Hide resolved
...g/kie/kogito/quarkus/serverless/workflow/config/KogitoServerlessWorkflowBuildTimeConfig.java
Outdated
Show resolved
Hide resolved
...java/org/kie/kogito/quarkus/workflow/deployment/config/KogitoDevServicesBuildTimeConfig.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/org/kie/kogito/quarkus/workflow/config/KogitoPersistenceBuildTimeConfig.java
Outdated
Show resolved
Hide resolved
...mon/src/main/java/org/kie/kogito/quarkus/workflow/config/KogitoPersistenceRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...-usertask-storage-jpa/src/main/java/org/jbpm/usertask/jpa/mapper/TaskInputsEntityMapper.java
Outdated
Show resolved
Hide resolved
| } | ||
| repository.persist(outputEntity); | ||
| // No explicit persist needed: parent has @OneToMany(cascade = CascadeType.ALL), | ||
| // so child entities are automatically persisted when the parent is saved. |
| metadataEntity.setJavaType(value.getClass().getName()); | ||
| } | ||
| repository.persist(metadataEntity); | ||
| // No explicit persist needed: parent has @OneToMany(cascade = CascadeType.ALL), |
There was a problem hiding this comment.
@jeejz See this can be removed too
(Out of curiosity, keeping the persist call results in some issue?
martinweiler
left a comment
There was a problem hiding this comment.
Great work on this huge effort @jeejz - thank you!
f35d1ed to
64bbe68
Compare
64bbe68 to
757e9ee
Compare
|
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #4178 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-4178/37/display/redirect Test results:
Those are the test failures: org.kie.kogito.integrationtests.quarkus.TaskIT.testUpdateTaskInfo1 expectation failed.Expected status code <403> but was <200>. |
...a/src/main/java/org/jbpm/usertask/jpa/springboot/SpringBootUserTaskJPAAutoConfiguration.java
Show resolved
Hide resolved
|
all greens @jeejz ª |
Ticket
apache/incubator-kie-issues#2204
Referenced pull requests
apache/incubator-kie-optaplanner#3201
apache/incubator-kie-drools#6575
#4178
apache/incubator-kie-kogito-apps#2298
apache/incubator-kie-kogito-examples#2162
Major Dependency Upgrades
Key Migration Changes
AsyncAPI 3.0.0
OperationAction.SEND/RECEIVEreplaces publish/subscribe modelFabric8 Kubernetes Client 7.3.1
openshift-server-mockremoved → useKubernetesMockServercreateOrReplace()removed → usecreateOr()@WithKubernetesTestServer→@QuarkusTestResourceHibernate 7.x
PostgreSQL / SCRAM
com.ongres.scram:client(2.x) →com.ongres.scram:scram-client(3.x)15.9-alpine3.20→16.8-alpine3.21Kafka 4.0.0
MockProducerconstructor now requires explicit partitioner parameterQuarkus DevTools
quarkus-devtools-utilitiesnow explicit dependency-AlegacyConfigRoot=truecompiler argumentNative Build
Test Changes
LiveReloadProcessorTesttemporarily disabledMany thanks for submitting your Pull Request ❤️!
Closes/Fixes/Resolves apache/incubator-kie-issues#2204
Dependency Changes for upgrading Spring boot to 3.5.10 and Quarkus to 3.27.2
Please make sure that your PR meets the following requirements:
Issue-XYZ Subject[0.9.x] Issue-XYZ SubjectHow to replicate CI configuration locally?
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.